package com.wonyesoft.wuliu.acticity;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

import com.lidroid.xutils.BitmapUtils;
import com.wonyesoft.wuliu.R;
import com.wonyesoft.wuliu.acticity.base.BaseActivity;
import com.wonyesoft.wuliu.api.GagApi;


public class ImageDetailsActivity extends BaseActivity {
	
	ImageView zoomImageView;
	@SuppressLint("NewApi")
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.image_details);
		zoomImageView = (ImageView) findViewById(R.id.zoom_image_view);
		String path = getIntent().getExtras().getString("path");
		System.out.println("path"+path);
		BitmapUtils  bitmapUtils  = new BitmapUtils(this);
		bitmapUtils.display(zoomImageView,  path);
		zoomImageView.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				finish();
			}
		});
	/*	bitmapUtils.display( null,  GagApi.SOURCEADRR + path, new BitmapLoadCallBack<View>() {

			@Override
			public void onLoadCompleted(View arg0, String arg1, Bitmap bitmap,
					BitmapDisplayConfig arg3, BitmapLoadFrom arg4) {
				// TODO Auto-generated method stub
				System.out.println("arg1"+arg1);
				if(bitmap!=null){
				zoomImageView = (ZoomImageView) findViewById(R.id.zoom_image_view);
				zoomImageView.setImageBitmap(bitmap);  }
			}

			@Override
			public void onLoadFailed(View arg0, String arg1, Drawable arg2) {
				// TODO Auto-generated method stub
				showLongToast("失败啊啊 ");
			}
		});*/
		}
}
